<?php

	class UpdateModuleCommand implements ICommand
	{
		public function execute($event)
		{
			$module = $event->data['module'];
			$file = MODULES_PATH.'/'.$module.'/'.$module.'_Module.php';
			
			if (file_exists($file))
			{
				include($file);
				
				$reflectionClass = new ReflectionClass($module.'_Module');
		
				$instance = $reflectionClass->newInstance();
			}
			else
			{
				$instance = new EbModule($module);	
			}
						
			return 'Result :'.$instance->update();
		}
	}